<template>
  <div>
    <sort-bar>
      <template v-slot:left>
        <div class="left">热门主播</div>
      </template>
      <template v-slot:right>
        <div class="right">更多 ></div>
      </template>
    </sort-bar>
    <loader v-if="!djList"></loader>
    <div class="container">
      <div v-for="item in djList" :key="item.id" class="dj">
        <img :src="item.avatarUrl" :alt="item.nickName" />
        <div class="dj-info">
          <p>
            {{item.nickName}}
            <span></span>
          </p>
          <p>
            热度：
            <i>{{item.rank}}</i>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import SortBar from '@/components/content/sortbar/SortBar'
import Loader from '@/components/common/loader/Loader'

export default {
  components: {
    SortBar,
    Loader
  },
  props: {
    djList: {
      type: Array,
      default() {
        return []
      }
    }
  }
}
</script>

<style scoped>
.sort-bar >>> .left,
.sort-bar >>> .center,
.sort-bar >>> .right {
  flex: 8;
}

/* 标题区域 */
.left {
  font-size: 12px;
  font-weight: 700;
}
.right {
  font-size: 12px;
  cursor: pointer;
}

/* dj信息 */
.dj {
  cursor: pointer;
  margin: 25px 0;
  display: flex;
}

/* dj左边图片 */
.dj img {
  width: 40px;
  height: 40px;
}

/* dj名字信息 */
.dj-info span {
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url(~@/assets/img/dj.png);
}
.dj-info p {
  width: 150px;
  height: 20px;
  line-height: 20px;
  font-size: 13px;
  color: #fff;
  padding-left: 15px;
}
.dj-info i {
  color: #d81e06;
  font-size: 15px;
}
</style>